﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace yq.IBase.DBHelper.Tool
{
    /// <summary>
    /// Mysql
    /// </summary>
    public class MysqlTool : ITool
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="hp"></param>
        /// <returns></returns>
        public Dictionary<string, string> GetTableList(DbHelper hp)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="sql"></param>
        /// <returns></returns>
        public SelectSQL GetRowLock(SelectSQL sql)
        {
            sql.End = sql.End + " for update ";

            return sql;
        }

        public SelectSQL Top(SelectSQL sql, int top)
        {
            sql.End = sql.End + " limit  0," + top;

            return sql;
        }
    }
}
